{% extends 'base.html' %}
{% block title %}
项目编辑
{% endblock %}
{% block content %}
<div class="row">
    <div class="col-3"></div>
    <div class="col-6">
        <form method="post">
            <div class="form-group">
                <label for="exampleInputName" class="form-label">产品名称<label style="color: red;">*</label></label>
                <input type="text" name="name" class="form-control" id="name" aria-describedby="namehelp"
                    value="{{ product.name }}" required>
                <div id="namehelp" class="form-text">输入产品名称</div>
            </div>
            <div class="form-group">
                <label for="exampleInputDesc" class="form-label">产品描述<label style="color: red;">*</label></label>
                <input type="text" class="form-control" value="{{ product.desc }}" id="desc" name="desc">
                <div id="deschelp" class="form-text">请添加一个产品的大概介绍</div>
            </div>
            <div class="form-group">
                <label for="method">产品类型</label><label style="color: red;">*</label></label>
                <select class="form-control" id="product_type" name="product_type">
                    <option selected>选择产品类型</option>
                    {% for name, tag in tags %}
                    <option value="{{ name }}" {% if product.tag == name %}
                        selected="selected"
                    {% endif %}>{{ tag }}</option>
                    {% endfor %}
                </select>
            </div>
            <div class="form-group">
                <label for="url">是否删除</label></label>
                <div class="radio">
                    <label><input type="radio" name="delete">删除勾选框(<font style="color: red;">请谨慎操作</font>)</label>
                </div>
            </div>
            <br>
            <button type="submit" class="btn btn-primary">更新</button>
        </form>
    </div>

</div>
{% endblock %}